package org.kzwl.service.web.impl;

import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.kzwl.entity.web.CuData;
import org.kzwl.mapper.web.CuDataMapper;
import org.kzwl.service.web.CuDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

@Service
public class CuDataServiceImpl extends ServiceImpl<CuDataMapper, CuData> implements CuDataService {

    @Autowired
    CuDataMapper cuDataMapper;

    @Override
    public CuData findToday() {
        new LambdaUpdateWrapper<>().set()
        return cuDataMapper.selectOne(new LambdaQueryWrapper<CuData>().eq(CuData::getCuDataDate, DateUtil.beginOfDay(new Date())));
    }
}
